package com.dykj.fireFighting.web.rocketmq.producer;

import com.dykj.fireFighting.web.rocketmq.message.DevHisSSPushMessage;
import org.apache.rocketmq.client.producer.SendCallback;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author: zly
 * @Description :
 * @Date: 2021-12-02
 */
@Component
public class DevHisSsPushProducer {
    @Autowired
    private RocketMQTemplate rocketMQTemplate;
    public void asyncSend(DevHisSSPushMessage devHisSSPushMessage, SendCallback callback) {
        // 异步发送消息
        rocketMQTemplate.asyncSend(DevHisSSPushMessage.TOPIC, devHisSSPushMessage, callback);
    }
}
